<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view>
			<button type="primary" @tap="go_add">新增新闻</button>
		</view>
		<view>
			<button type="primary" @tap="go_lst">查看新闻</button>
		</view>
		<view>
			<button type="primary" @tap="go_upload">上传图片</button>
		</view>
		<view>
			<button type="primary" @tap="go_login">登录</button>
		</view>
		<view>
			<button type="primary" @tap="go_scan">扫码</button>
		</view>
		<view>
			<button type="primary" @tap="go_camera">拍照</button>
		</view>
		<view>
			<button type="primary" @tap="go_location">获取位置</button>
		</view>

	</view>
</template>

<script>
	import config from '../../lib/config.js'
	
	export default {
		data() {
			return {
				title: 'uni_curd'
			}
		},
		onLoad() {
			console.log(config);
		},
		methods: {
			go_add: function() {
				uni.navigateTo({
					url: '../add/add'
				})
			},
			go_lst: function() {
				uni.navigateTo({
					url: '../lst/lst'
				});
			},
			go_upload: function(){
				uni.navigateTo({
					url: '../upload/upload'
				})
			},
			go_login: function(){
				uni.navigateTo({
					url: '../login/login'
				})
			},
			go_scan: function(){
				uni.navigateTo({
					url: '../scan/scan'
				})
			},
			go_camera: function(){
				uni.navigateTo({
					url: '../camera/camera'
				})
			},
			go_location: function(){
				uni.navigateTo({
					url: '../location/location'
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200upx;
		width: 200upx;
		margin-top: 200upx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50upx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36upx;
		color: #8f8f94;
	}
</style>
